package com.dfwl.packageio.core.db;

import android.content.Context;

import com.lidroid.xutils.DbUtils;

public class DbRepository {
    private final static int VERSION = 1;
    private final static String DB_NAME = "dfwl.db";

    private DbUtils mDbUtil;

    private Context mContext;


    public DbRepository(Context mContext) {
        this.mContext = mContext;
        getContentDb();
    }

    public DbUtils getContentDb() {
        if(mDbUtil==null){
            String filePath = "/data/data/com.dfwl.packageio/databases/";
            mDbUtil = DbUtils.create(mContext, filePath,DB_NAME, VERSION, new DbUtils.DbUpgradeListener() {
                @Override
                public void onUpgrade(DbUtils db, int oldVersion, int newVersion) {
                }
            });
            onCreate(mDbUtil);

        }
        return mDbUtil;
    }

    public void onCreate(DbUtils db){

    }




}
